import my_observer_pattern.concrete_observer.WechatUser;
import my_observer_pattern.concrete_subject.SubscriptionSubject;
import my_observer_pattern.observer.Observer;
import my_observer_pattern.subject.Subject;
import org.junit.Test;

public class my_pattern_test {

    @Test
    public void test(){
        Observer user1 = new WechatUser("小陈");
        Observer user2 = new WechatUser("老王");

        Subject subject = new SubscriptionSubject();
        subject.attach(user1);
        subject.attach(user2);

        subject.notify("防控第五号文件");
    }
}
